package com.pencilisland.pay.api.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.pencilisland.pay.api.entity.TradeOrderEntity;

public interface TradeOrderRepository extends CrudRepository<TradeOrderEntity, String> {

	List<TradeOrderEntity> findByPayStatus(Integer payStatus);
	
	@Modifying
	@Query("update TradeOrderEntity a set a.syncMgt=?2 where a.orderNo=?1")
	public void updateSyncMgt(String orderNo,String flag);

}
